//
//  ShangPinFeNLeiShuXing.m
//  EJLX
//
//  Created by adc on 15/11/24.
//  Copyright © 2015年 江苏一键联信息科技有限公司. All rights reserved.
//

#import "ShangPinFeNLeiShuXing.h"

@implementation ShangPinFeNLeiShuXing
+(id)userWithDictionary:(NSDictionary*)userDic
{
    return [[self alloc]initWithDictionary:userDic];
}
-(id)initWithDictionary:(NSDictionary*)userDic
{
    self=[super init];
    if (self)
    {
        
        
        _attrId=[userDic[@"attrId"]intValue];
        _attrValueId=[userDic[@"attrValueId"]intValue];
        _stock=[userDic[@"stock"]intValue];
        _attrValueName=[userDic[@"attrValueName"]copy];

       
        
        _attrName=[userDic[@"attrName"]copy];
       
        _resultAry=[NSMutableArray array];
        NSMutableArray*array=userDic[@"childrenAttr"];
        for (int i=0;i< array.count; i++)
        {
            ChildrenAttr*ch=[ChildrenAttr userWithDictionary:array[i]];
            [_resultAry addObject:ch];
        }
        
    }
    return self;
}
@end
